#pragma once
#include "object_ptr.h"

namespace Pdf
{
    enum ObjectType
    {
        objNull,
        objInteger,
        objReal,
        objKeyword,
        objComment,
        objName,
        objString,
        objArray,
        objNames,
        objDictionary,
        objReference,
    };

    struct Visitor;

    class __declspec(novtable) Object
    {
    public:
        typedef SmartPtr<Object> Ptr;

                                    Object() throw();
        virtual                    ~Object() throw();

        virtual void     __fastcall apply(Visitor *visitor) = 0;
		virtual Object*  __fastcall clone() = 0;

        void                        addref() throw();
        void                        release() throw();

    private:
        unsigned int                refCount;
    };

    template <typename TargetType>
    TargetType cast(Object::Ptr obj);
}

#include "object_base.inl"